package com.lisx.module_add_new_word.utils;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;

public class SpHelper {
    //是否第一次加载数据
    public static void setFirstTime(Context context, boolean isAuth) {
        SharedPreferences userPreferences = context.getSharedPreferences("FirstTime", Activity.MODE_PRIVATE);
        SharedPreferences.Editor editor = userPreferences.edit();
        editor.putBoolean("type", isAuth);
        editor.commit();
    }

    public static boolean getFirstTime(Context context) {
        SharedPreferences userPreferences = context.getSharedPreferences("FirstTime", Activity.MODE_PRIVATE);
        return userPreferences.getBoolean("type", true);
    }
}
